<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JSON</title>

</head>
<body>


<script type="text/javascript">
   let clazz = {
       students : [
           {
               name:"张三" ,
               age:22 ,
               tag : [
               "法外狂徒","90后"
               ]
           } ,
           {

           }
       ] ,
       createDate : new Date() ,  // 表示当前时间
       id : 1 ,
       name : "生产实习——软件一班——甲骨文" ,
       sum : function(){
           return   this.students.length ;
       }
   } ;

   console.log( typeof clazz ) ;
   console.log( clazz.id ) ;
   console.log( clazz.createDate ) ;
   console.log( clazz.name ) ;
   console.log( clazz.sum ) ;
   console.log( clazz.students[0].name ) ;

   // let s = "{ 'name':'zhangsan' , 'age':'16' }" ;
   //
   // let x = JSON.parse(s) ;
   // console.log( x ) ;
</script>


</body>
</html>